import 'package:get/get.dart';

// 用户表的键
class DbTableUserKeys {
  static const String userId = "id";
  static const String token = "token";
  static const String timezoneOffset = "timezone_offset";
  static const String signature = "signature";
  static const String coin = "coin";
  static const String country = "country";
  static const String province = "province";
  static const String city = "city";
  static const String name = "name";
  static const String nickname = "nickname";
  static const String birthday = "birthday";
  static const String avatar = "avatar";
  static const String email = "email";
  static const String phone = "phone";
  static const String checkinContinuedDays = "checkin_continued_days";
  static const String sex = "sex";
  static const String xAuth = "x_auth";
  static const String isSelected = "is_selected";

  static const List<String> values = [
    userId,
    token,
    timezoneOffset,
    signature,
    coin,
    country,
    province,
    city,
    name,
    nickname,
    birthday,
    avatar,
    email,
    phone,
    checkinContinuedDays,
    sex,
    xAuth,
    isSelected,
  ];

  // 通过 title 获取键
  static String? getTypeByTitle(String title) =>
      values.firstWhereOrNull((key) => key == title);
}
